using System.Collections.Specialized;
using System.Xml;
using RaisingStudio.Data.Common.Configuration;
using RaisingStudio.Common.Xml;

namespace RaisingStudio.Data.Common.Managers
{
	/// <summary>
	/// Summary description for AliasDeSerializer.
	/// </summary>
	public sealed class AliasDeSerializer
	{
		/// <summary>
		/// Deserialize a Alias object
		/// </summary>
		/// <param name="node"></param>
		/// <param name="configScope"></param>
		/// <returns></returns>
        public static Alias Deserialize(XmlNode node)
		{
            Alias alias = new Alias();

			NameValueCollection prop = NodeUtils.ParseAttributes(node);
            alias.Name = NodeUtils.GetStringAttribute(prop, "name");
            alias.TypeName = NodeUtils.GetStringAttribute(prop, "type");

            return alias;
		}
	}
}
